<?php

namespace app\modules\admin\controllers;

use Yii;
use yii\web\Controller;
use yii\web\Response;

/**
 * 主控制器
 * Class DefaultController
 * @package app\modules\adminassets\controllers
 */
class SiteController extends Controller
{
    /**
     * 主页
     * @return string|\yii\web\Response
     */
    public function actionIndex()
    {
        return $this->render('index');
    }
    /**
     * 登录
     * @return string|\yii\web\Response
     */
    public function actionLogin()
    {
        return $this->render('login');
    }

    /**
     * Logout action.
     *
     * @return Response
     */
    public function actionLogout()
    {
        Yii::$app->user->logout();

        return $this->goHome();
    }
}
